home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / PCI Driver Development Kit / • Tools / Utility / PCI Peek / PCIPeek 2.1 Project / PCIPeek.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-20  |  3.2 KB  |  134 lines  |  [TEXT/MPCC]

  1. /*-----------------------------------------------------------------
  2.  *
  3.  *  Program:        PCIBusTest
  4.  *
  5.  *    File:            project.h
  6.  *
  7.  *  Author:            Paul Freeburn
  8.  *  Date:            Dec 13, 1994
  9.  *
  10.  *-----------------------------------------------------------------
  11.  */
  12.  
  13.  
  14. #ifndef __PROJECT__
  15. #define __PROJECT__
  16.  
  17. #ifndef REZ
  18. #include <ConditionalMacros.h>
  19. #if GENERATINGPOWERPC == 0
  20.     << error: the following will not work >>
  21. #endif
  22.  
  23.  
  24. /*        DEFINES        */
  25. #define NAME_NODE_SIZE = 132
  26. #define TRUE 1
  27. #define YES 1
  28. #define FALSE 0
  29. #define NO 0
  30.  
  31. #define ERR_MEMALLOC    -1
  32.  
  33.  
  34.  
  35. /*        INCLUDES        */
  36. #include <Types.h>
  37. #include <MixedMode.h>
  38. #include <OSUtils.h>
  39. #include <Files.h>
  40. #include <QuickdrawText.h>
  41. #include <QuickDraw.h>
  42. #include <Events.h>
  43. #include <Errors.h>
  44. #include <Memory.h>
  45. #include <Menus.h>
  46. #include <Controls.h>
  47. #include <Windows.h>
  48. #include <TextEdit.h>
  49. #include <Dialogs.h>
  50. #include <MachineExceptions.h>
  51. #include <PCI.h>
  52. #include <Kernel.h>
  53. #include <NameRegistry.h>
  54. #include <CodeFragments.h>
  55. #include <Devices.h>
  56. #include <Fonts.h>
  57. #include <Resources.h>
  58. #include <LowMem.h>
  59. #include <StandardFile.h>
  60. #include <IntlResources.h>
  61. #include <Script.h>
  62. #include <TextUtils.h>
  63. #include <SegLoad.h>
  64. #include <FixMath.h>
  65. #include <ToolUtils.h>
  66. #include <Gestalt.h>
  67. #include <Printing.h>
  68. #include <AppleTalk.h>
  69.  
  70.  
  71. #include <stdio.h>
  72. #include <stdlib.h>
  73. #include <string.h>
  74. #include <ctype.h>
  75.  
  76. //#include "BanditTest.h"
  77. //#include "gentest.h"
  78. //#include "hardware.h"
  79. /* want to take out as many of these as possible! */
  80. #define True        0xffffffff
  81. #define False        0x00000000
  82. #define CR            0x0d
  83. #define LF            0x0a
  84. #define    Rubout        0x08
  85. #define Tab            0x09
  86. #define NOP            0x00
  87. #define Null        False
  88. #define Blank        0x20
  89.  
  90. #define lengthByte            0x01    /* number of bytes */
  91. #define    lengthWord            0x02    /* number of bytes */
  92. #define lengthLongword        0x04    /* number of bytes */
  93. #define lengthDoubleword    0x08    /* number of bytes */
  94. #define lengthPage            0x10    
  95.  
  96. #define    typeConfig            0x10    /* Configuration type transaction */
  97. #define    typeIO                0x20    /* IO type transaction */
  98. #define typeMemory            0x40    /* Memory type transaction */
  99. #define    typeSpecialWrite    0x80    /* ExpMgrSpecialCycleWriteLong */
  100. #define typeSpecialBroadcast    0x50    /* ExpMgrSpecialCycleBroadcastLong */
  101. #define interruptAcknowledge    0x60    /* ExpMgrInterruptAcknowledge */
  102.  
  103.  
  104.  
  105. /*        STRUCTS        */
  106. // like in PCI.h
  107. struct PCIUnitAddress {
  108.     PCIAddressSpaceFlags            addressSpaceFlags;
  109.     PCIBusNumber                    busNumber;
  110.     PCIDeviceFunction                deviceFunctionNumber;
  111.     PCIRegisterNumber                registerNumber;
  112. };
  113. typedef struct PCIUnitAddress PCIUnitAddress, *PCIUnitAddressPtr;
  114.  
  115.  
  116.  
  117. /*        PROTOTYPES        */
  118.  
  119. void Help();
  120. void ProcessCommand_D();
  121. void ProcessCommand_S();
  122. void DisplayMemoryIOConfig(UInt32 StartAddress, UInt32 DisplayLength, UInt8 TransType);
  123. OSStatus FindPropertyWithValue(const RegPropertyName *propertyName, const void *propertyValue, const RegPropertyValueSize propertySize, RegEntryID *foundEntry);
  124. OSStatus FindNameWithUnitAddr(const void *nodeNameValue, const RegPropertyValueSize nodeNameSize, const UInt32 unitAddr, RegEntryID *foundEntry);
  125. OSStatus MessageDeviceUnderTest(const RegEntryID *theEntry);
  126. OSStatus DisplayConfiguration(const RegEntryID *theEntry);
  127. void GetNodeName(void);
  128. void ToUpperString(Ptr theString);
  129.  
  130.  
  131. #endif /* REZ */
  132. #endif
  133.  
  134.